package com.lestco;

import com.crungoo.sdk.mqttplus.MQTTXSendFailRetryService;
import com.crungoo.sdk.mqttplus.MQTTXStartService;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author fujc2dev@126.com
 * @date 2024-05-17 11:00
 */
@Component
public class ApplicationMinioRunner implements ApplicationRunner {
    @Resource
    private MQTTXStartService mqttXStartService;
    @Resource
    private MQTTXSendFailRetryService mqttXSendFailRetryService;


    @Override
    public void run(ApplicationArguments args) throws Exception {
        mqttXStartService.connect();
        mqttXSendFailRetryService.retry();
    }
}
